package com.ruoyi.user.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.user.api.domain.CheCar;
import com.ruoyi.user.api.factory.RemoteCarFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * @ClassName RemoteOrderService
 * @Description TODO
 * @Author yun
 * @Date 2025年01月02日 11:13
 * @Version 1.0
 */
@FeignClient(contextId = "remoteCarService", value = ServiceNameConstants.USER_SERVICE, fallbackFactory = RemoteCarFallbackFactory.class)
public interface RemoteCarService {

    @GetMapping(value = "/car/{id}")
    AjaxResult getInfo(@PathVariable("id") Long id,@RequestHeader(SecurityConstants.INNER) String source);

    @GetMapping(value = "/car/ids/{ids}")
    AjaxResult findByIdIn(@PathVariable("ids") Long[] ids,@RequestHeader(SecurityConstants.INNER) String source);

    @GetMapping("/car/list")
    public TableDataInfo list(CheCar cheCar);


    @GetMapping("/car/listbychepai")
    public AjaxResult listbychepai(String chepai);


}
